package utils;

/**
 * 该队列用于保存全局ThreadLocal
 * @program: MyQueue
 * @description:
 * @author: Cheng Zhi
 * @create: 2022-02-18 15:18
 **/
public class ContextUtils {

    public static final ThreadLocal<String> context = new ThreadLocal<String>();

    public static void setDbKey(String dbKey) {
        context.set(dbKey);
    }

    public static String getDbKey() {
        return context.get();
    }

    public static void remoteDbKey() {
        context.remove();
    }
}
